﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DTO;
using DAO;
namespace BUS
{
    public class BUS_DonHang
    {
        DAO_DonHang dao_DH = new DAO_DonHang();

        public List<DTO_ThongTinDH> LayDanhSachDonHang(int madn)
        {
            return dao_DH.LayDanhSachDH(madn);
        }
        public List<DTO_DonHangView> AdLayDSDH()
        {
            return dao_DH.AdLayDSDH();
        }
        public List<DTO_DonHangView> LayDSDHTheoNguoiDat(String nguoiDat)
        {
            return dao_DH.LayDSDHTheoNguoiDat(nguoiDat);
        }
        public List<DTO_ThongTinDH> LayDSDH()
        {
            return dao_DH.LayDSDH();
        }

		public List<DTO_DonHang> SelectAll(string ma)
        {
            return dao_DH.SelectAll(ma);   
        }

        public void Insert(DTO_DonHang donhang)
        {
            dao_DH.Insert(donhang);
        }

        public void Delete(int ma)
        {
            dao_DH.Delete(ma);
        }
        public DTO_DonHang GetThongTinDH(string ma)
        {
            return dao_DH.GetThongTinDH(ma);
        }
        public DTO_DonHang SelectDH(string ma)
        {
            return dao_DH.SelectDH(ma);
        }
        public void UpdateTinhTrangThanhToan(int ma, int value)
        {
            dao_DH.UpdateTinhTrangThanhToan(ma, value);
        }

        public bool AdUpdateDH(DTO_DonHang dh)
        {
            return dao_DH.AdUpdateDH(dh);
        }

        public bool UpdateTinhTrang(DTO_DonHangView dTO_DonHangView)
        {
            return dao_DH.UpdateTinhTrang(dTO_DonHangView);
        }
    }
}
